const Angular = require('angular');
const app = Angular.module('timeLineApp', []);
import './index.scss'
import timeLine from '../../../components/timeLine';
timeLine(app)
import multipleLevel from '../../../components/multipleLevel';
multipleLevel(app)
app.controller('timeLineCtr', ['$scope', '$timeout', '$http', function ($scope, $timeout, $http) {
    $scope.title = 'timeLine controller';
    $scope.aggFields = ['deviceid_linkid','event_name','dst_ip','alarm_category'];
    $scope.dataSource = {};
    $http.get('/getForceData').then(function (res) {
        console.log(res);
        $scope.dataSource = res.data.data.aggs;
    })
    // $scope.activeNode = 'value0'
    // $scope.timeLineData = [];
    // for(let i = 0; i < 5; i++){
    //     let key = 'key'+i;
    //     let value = 'value'+i
    //     $scope.timeLineData.push({key, value})
    // }

}])